package com.wuseguang.springcloud.dao.repository;

import com.wuseguang.springcloud.entity.Exams;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import javax.transaction.Transactional;

public interface ExamsRepository extends JpaRepository<Exams,Integer> {

    @Transactional
    @Modifying
    @Query(value = "delete from exams where examination_room_id=?1",nativeQuery = true)
    Integer deleteByExaminationRoomId(Integer id);
}
